package com.yuwei.home.parking_space_management.car_adapter

import android.graphics.Color
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.yuwei.home.AddParkingItemEntity
import com.yuwei.home.R

class AddParkingZTAdapter:BaseQuickAdapter<AddParkingItemEntity,BaseViewHolder>(R.layout.add_parking_iten) {
    override fun convert(holder: BaseViewHolder, item: AddParkingItemEntity) {

        if (item.isShow){
            holder.setText(R.id.parking_zt1,item.title)
                .setBackgroundResource(R.id.parking_zt1,R.drawable.add_parking_zt2)
                .setTextColor(R.id.parking_zt1,Color.parseColor("#2196F3"))
        }else{
            holder.setText(R.id.parking_zt1,item.title)
                .setBackgroundResource(R.id.parking_zt1,R.drawable.add_parking_zt1)
                .setTextColor(R.id.parking_zt1,Color.BLACK)
        }
    }
}